package com.engine4cloud.tdf.common.core.constant.enums;

import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import lombok.Getter;

import java.io.Serializable;

/**
 * 审批动作全流程节点
 */
@Getter
public enum AllAuditActionStatusEnum implements Serializable {
    CREATE("CREATE", "创建", "待审核"),

    /**
     * 撤销，随时都可以撤销，不受审批流程节点限制
     */
    CANCEL("CANCEL", "撤销", "已撤销"),

    /**
     * 需要二级及以上的审批
     */
    VILLAGE_AUDIT("VILLAGE_AUDIT", "审核", "待审批"),

    /**
     * 审核通过流程结束
     */
    AUDIT("AUDIT", "审核", "审核通过"),

    /**
     * 所拒绝流程结束
     */
    REFUSE("REFUSE", "拒绝", "所拒绝"),

    /**
     * 需要三级及以上审批
     */
    COUNTRY_AUTHORIZE("COUNTRY_AUTHORIZE", "审批", "待批准"),

    /**
     * 审批通过流程结束
     */
    AUTHORIZE("AUTHORIZE", "审批", "审批通过"),

    /**
     * 县局拒绝流程结束
     */
    REJECT("REJECT", "拒绝", "局拒绝"),

    /**
     * 市批准通过流程结束
     */
    APPROVE("APPROVE", "批准", "批准通过"),

    /**
     * 市局否决流程结束
     */
    VETO("VETO", "否决", "否决"),

    /**
     * 已结束（审批通过的流程，如:销假，这里统一标记为结束）
     */
    FINISH("FINISH", "结束", "已结束");

    @Enumerated(EnumType.STRING)
    private String type;
    private String desc;
    private String status;

    AllAuditActionStatusEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    AllAuditActionStatusEnum(String type, String desc, String status) {
        this.type = type;
        this.desc = desc;
        this.status = status;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
